package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun register(user: User):Long

    @Update
    fun update(user: User)

    @Delete
    fun delete(user: User)

    @Query("select * from user where uname=:uname and upass=:pass and role=:role")
    fun login(uname:String,pass:String,role:Int):User

}